from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
import time


driver = webdriver.Chrome()
driver.maximize_window()
driver.get("https://www.jiuxian.com/")
login_window = By.XPATH, '/html/body/div[2]/div/div[1]/div/a[1]'
login_username = By.CSS_SELECTOR, '#loginform > div > div > div > div > div.loginCon > div.loginType.loginUsual > div:nth-child(1) > div.filter > p'
login_pwd = By.CSS_SELECTOR, '#captchaImage'
login_btn = By.ID, 'save'
login_sure = By.XPATH, '/html/body/div[1]/div[4]/div[2]/div[2]/a'
login_exit = By.XPATH, '/html/body/div[2]/div/div[1]/div/a[1]'
driver.find_element(*login_window).click()
time.sleep(1)
driver.find_element(*login_username).send_keys('15985645480')
time.sleep(1)
driver.find_element(*login_pwd).send_keys('gw09092434')
time.sleep(15)
driver.find_element(*login_btn).click()
time.sleep(1)
driver.find_element(*login_sure).click()
time.sleep(1)
driver.find_element(*login_exit).click()
time.sleep(3)
driver.quit()

